
<#include "/common/head.html"/>


 <div class="easyui-panel updatePage" data-options="fit:true,border:false">
    <form id="ff" class="easyui-form" method="post">
        <table class="table1">
            <tr>
           		<th><span id="content_label">题干：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="content" id="content" value="${model.content!''}" data-options="fit: true"></input></div>
           		</td>
           		
            <tr>
           		<th><span id="type_label">题型：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="type" id="type" value="${model.type!''}" data-options="fit: true"></input></div>
           		</td>
           		
            </tr>
            <tr>
           		<th><span id="label_label">标签：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="label" id="label" value="${model.label!''}" data-options="fit: true"></input></div>
           		</td>
           		
            </tr>
            <tr>
           		<th><span id="answer_label">答案：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="answer" id="answer" value="${model.answer!''}" data-options="fit: true"></input></div>
           		</td>
           		
            </tr>
            <tr>
           		<th><span id="options_label">选项：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="options" id="options" value="${model.options!''}" data-options="fit: true"></input></div>
           		</td>
           		
            </tr>
            <tr>
           		<th><span id="difficulty_label">难度：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="difficulty" id="difficulty" value="${model.difficulty!''}" data-options="fit: true"></input></div>
           		</td>
           		
            </tr>
            <tr>
           		<th><span id="score_label">默认分值：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-numberspinner" type="text" name="score" id="score" value="${model.score!''}" data-options="fit: true"></input></div>
           		</td>
           		
            </tr>
            <tr>
           		<th><span id="analysis_label">题目解析：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="analysis" id="analysis" value="${model.analysis!''}" data-options="fit: true"></input></div>
           		</td>
           		
            </tr>
            <tr>
           		<th><span id="insert_time_label">插入时间：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-datebox" type="text" name="insert_time" id="insert_time" value="${model.insert_time!''}" data-options="fit: true"></input></div>
           		</td>
           		
            </tr>
            <tr>
           		<th><span id="update_time_label">更新时间：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-datebox" type="text" name="update_time" id="update_time" value="${model.update_time!''}" data-options="fit: true"></input></div>
           		</td>
           		
            </tr>
            <tr>
           		<th><span id="inputer_label">插入人名称：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="inputer" id="inputer" value="${model.inputer!''}" data-options="fit: true"></input></div>
           		</td>
           		
            </tr>
            <tr>
           		<th><span id="isDelete_label">是否被删除：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="isDelete" id="isDelete" value="${model.isDelete!''}" data-options="fit: true"></input></div>
           		</td>
           		
            </tr>
            <tr>
           		<th><span id="grade_label">年级：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-numberspinner" type="text" name="grade" id="grade" value="${model.grade!''}" data-options="fit: true"></input></div>
           		</td>
           		
            </tr>
            <tr>
           		<th><span id="courses_label">课程编号：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-numberspinner" type="text" name="courses" id="courses" value="${model.courses!''}" data-options="fit: true"></input></div>
           		</td>
           		
            </tr>
            <tr>
           		<th><span id="chapters_label">章节：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-numberspinner" type="text" name="chapters" id="chapters" value="${model.chapters!''}" data-options="fit: true"></input></div>
           		</td>
           		
            </tr>
        </table>
    </form>
</div>
<script>
top.window.subPage.save = save;
function save() {
	if($("#zcurdHeadTable").form('validate')) {
		$.post("update", getParam(), function(data) {
			top.window.closeWindow();
			top.window.subPage.loadCurrDatagrid();
		});
	}
}
function getParam() {
	var param = {
	     
	    "id": ${model.id}, 
       	    "model.content": getInputValue("content"), 
       	    "model.type": getInputValue("type"), 
       	    "model.label": getInputValue("label"), 
       	    "model.answer": getInputValue("answer"), 
       	    "model.options": getInputValue("options"), 
       	    "model.difficulty": getInputValue("difficulty"), 
       	    "model.score": getInputValue("score"), 
       	    "model.analysis": getInputValue("analysis"), 
       	    "model.insert_time": getInputValue("insert_time"), 
       	    "model.update_time": getInputValue("update_time"), 
       	    "model.inputer": getInputValue("inputer"), 
       	    "model.isDelete": getInputValue("isDelete"), 
       	    "model.grade": getInputValue("grade"), 
       	    "model.courses": getInputValue("courses"), 
       	    "model.chapters": getInputValue("chapters"), 
	}
	for(key in param) {
		if(!param[key]) {
			delete param[key];
		}
	}
	return param;
}

//扩展js
</script>
<#include "/common/foot.html"/>
